package model;

// Generated Jun 9, 2011 1:02:18 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Asistat generated by hbm2java
 */
@Entity
@Table(name = "asistat", catalog = "mydb")
public class Asistat implements java.io.Serializable {

	private Integer asistatId;
	private Reprezentantlegal reprezentantlegal;
	private String nume;
	private String prenume;
	private Integer cnp;
	private String sex;
	private String adresa;
	private String profesie;
	private String religie;
	private String studii;
	private Integer venit;
	private String handicap;
	private String stareCivila;
	private String cas;
	private String copii;
	private int userId;
	private String telefon;
	private Set<Evaluaresociala> evaluaresocialas = new HashSet<Evaluaresociala>(
			0);
	private Set<Serviciiasistat> serviciiasistats = new HashSet<Serviciiasistat>(
			0);

	public Asistat() {
	}

	public Asistat(int userId) {
		this.userId = userId;
	}

	public Asistat(Reprezentantlegal reprezentantlegal, String nume,
			String prenume, Integer cnp, String sex, String adresa,
			String profesie, String religie, String studii, Integer venit,
			String handicap, String stareCivila, String cas, String copii,
			int userId, String telefon, Set<Evaluaresociala> evaluaresocialas,
			Set<Serviciiasistat> serviciiasistats) {
		this.reprezentantlegal = reprezentantlegal;
		this.nume = nume;
		this.prenume = prenume;
		this.cnp = cnp;
		this.sex = sex;
		this.adresa = adresa;
		this.profesie = profesie;
		this.religie = religie;
		this.studii = studii;
		this.venit = venit;
		this.handicap = handicap;
		this.stareCivila = stareCivila;
		this.cas = cas;
		this.copii = copii;
		this.userId = userId;
		this.telefon = telefon;
		this.evaluaresocialas = evaluaresocialas;
		this.serviciiasistats = serviciiasistats;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "asistat_id", unique = true, nullable = false)
	public Integer getAsistatId() {
		return this.asistatId;
	}

	public void setAsistatId(Integer asistatId) {
		this.asistatId = asistatId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "reprezentant_id")
	public Reprezentantlegal getReprezentantlegal() {
		return this.reprezentantlegal;
	}

	public void setReprezentantlegal(Reprezentantlegal reprezentantlegal) {
		this.reprezentantlegal = reprezentantlegal;
	}

	@Column(name = "nume", length = 75)
	public String getNume() {
		return this.nume;
	}

	public void setNume(String nume) {
		this.nume = nume;
	}

	@Column(name = "prenume", length = 75)
	public String getPrenume() {
		return this.prenume;
	}

	public void setPrenume(String prenume) {
		this.prenume = prenume;
	}

	@Column(name = "cnp")
	public Integer getCnp() {
		return this.cnp;
	}

	public void setCnp(Integer cnp) {
		this.cnp = cnp;
	}

	@Column(name = "sex", length = 45)
	public String getSex() {
		return this.sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@Column(name = "adresa", length = 70)
	public String getAdresa() {
		return this.adresa;
	}

	public void setAdresa(String adresa) {
		this.adresa = adresa;
	}

	@Column(name = "profesie", length = 45)
	public String getProfesie() {
		return this.profesie;
	}

	public void setProfesie(String profesie) {
		this.profesie = profesie;
	}

	@Column(name = "religie", length = 45)
	public String getReligie() {
		return this.religie;
	}

	public void setReligie(String religie) {
		this.religie = religie;
	}

	@Column(name = "studii", length = 75)
	public String getStudii() {
		return this.studii;
	}

	public void setStudii(String studii) {
		this.studii = studii;
	}

	@Column(name = "venit")
	public Integer getVenit() {
		return this.venit;
	}

	public void setVenit(Integer venit) {
		this.venit = venit;
	}

	@Column(name = "handicap", length = 100)
	public String getHandicap() {
		return this.handicap;
	}

	public void setHandicap(String handicap) {
		this.handicap = handicap;
	}

	@Column(name = "stare civila", length = 45)
	public String getStareCivila() {
		return this.stareCivila;
	}

	public void setStareCivila(String stareCivila) {
		this.stareCivila = stareCivila;
	}

	@Column(name = "CAS", length = 45)
	public String getCas() {
		return this.cas;
	}

	public void setCas(String cas) {
		this.cas = cas;
	}

	@Column(name = "copii", length = 45)
	public String getCopii() {
		return this.copii;
	}

	public void setCopii(String copii) {
		this.copii = copii;
	}

	@Column(name = "user_id", nullable = false)
	public int getUserId() {
		return this.userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	@Column(name = "telefon", length = 25)
	public String getTelefon() {
		return this.telefon;
	}

	public void setTelefon(String telefon) {
		this.telefon = telefon;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "asistat")
	public Set<Evaluaresociala> getEvaluaresocialas() {
		return this.evaluaresocialas;
	}

	public void setEvaluaresocialas(Set<Evaluaresociala> evaluaresocialas) {
		this.evaluaresocialas = evaluaresocialas;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "asistat_has_serviciiasistat", catalog = "mydb", joinColumns = { @JoinColumn(name = "Asistat_asistat_id", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "ServiciiAsistat_serviciu_id", nullable = false, updatable = false) })
	public Set<Serviciiasistat> getServiciiasistats() {
		return this.serviciiasistats;
	}

	public void setServiciiasistats(Set<Serviciiasistat> serviciiasistats) {
		this.serviciiasistats = serviciiasistats;
	}

}
